<include file="Public:header" />
<div class="container"> <include file="Public:leftMenu" />
  <div class="mainbody">
  <include file="Public:activityMenu" />
    <div class="rig_lm03">
      
      <div class="detail-tab">
          <form name="form1"  enctype="multipart/form-data" method="post" action="__URL__/saveAddUser" role="form" >
          <div class="form-group">
            <label for="name">姓名<i>*</i></label>
            <input type="text" name="name" class="searcheTxt"  id="name" placeholder="" <notempty name="data.name">readonly="readonly"</notempty> value="{$data.name}">
          </div>
          <div class="form-group">
            <label for="img">头像</label>
            <input name="img" id="img" type="file" />
            <notempty name="data.img"><img class="<eq name="data.u_type" value="1">img<else/>img2</eq>" src="{$Think.config.IMG_PATH}{$data.img}" /></notempty>
            <p class="help-block formRemind">个人头像尺寸110*160，集体图片尺寸210*160的jpg格式的图片。</p>
          </div>
       <!--  <div class="form-group">
            <label for="u_type">类型</label>
            <input name="u_type" type="radio" value="1" checked="checked" />个人&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input name="u_type" type="radio" value="2" <eq name="data.u_type" value="2">checked="checked"</eq> />集体
          </div>-->
          <div class="form-group">
            <label for="info">简介</label>
            <textarea name="info" id="info" class="inputTextarea" style="height:100px;">{$data.info|strip_tags}</textarea>
          </div>
          <div class="form-group">
            <label for="detail">详情</label>
            <textarea name="detail" id="detail" class="inputTextarea" style="height:240px;">{$data.detail|strip_tags}</textarea>
          </div>
          
          <div class="form-group ">
            <label for="IbtnEnter"></label>
            <button type="button"  id="IbtnEnter" class="btn btn-primary "><span class="glyphicon glyphicon-floppy-saved"></span> 保 存 </button>
          </div>

          <input type="hidden" name="activityId" value="{$activityId}">
          </form>
      </div>
    </div>
  </div>
</div>

<style type="text/css">
 .img{  width: 110px; height: 160px;}
 .img2{ width: 240px; height: 165px;}
</style>

<include file="Public:footer" /> 
<script type="text/javascript">

$(function(){
	$("#IbtnEnter").click(function(){
		   saveActivity();
	 });
});

function saveActivity() {
    var state = true;
    if ($("#name").attr("value") == "") {
        alert("请输入姓名！");
        state = false;
        $("#name").focus();
        return false
    }
    
    if (state) {
       $("form").submit();
		//commonAjaxSubmit("__URL__/saveAddAvtivity","{$_REQUEST['id']}");
    }
};
</script>